package net.huashitong.taskGroup.databean;

public enum LoginHeaders {
    userName("userName","姓名"),
    branch("branch","部门"),
    role("role","角色"),
    num("num","登录次数"),
    rownum("rownum","登录排名"),
    progressNodes("progressNodes","进行中节点个数")
    ;

private String code;
private String value;

    LoginHeaders(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static LoginHeaders getValues(String code)
    {
        for ( LoginHeaders head : values())
        {
            if(head.getCode().equals(code))
            {
                return  head;
            }
        }

        return  null;
    }

}
